package com.example.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;

/**
 * @program: springboot_course
 * @description: 将 MethodValidationPostProcessor 注入到Spring容器中，是方法参数校验时需要注入的bean
 * @author: ChenZhiXiang
 * @create: 2019-06-11 10:13
 **/
@Configuration
public class PpValidatorBeanConfigurer {

    @Bean
    public MethodValidationPostProcessor methodValidationPostProcessor() {
        return new MethodValidationPostProcessor();
    }

}
